package com.zhentao.controller;

import com.zhentao.pojo.Hospital;
import com.zhentao.service.HospitalService;
import com.zhentao.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/hospital")
public class HospitalController {
    @Autowired
    private HospitalService hospitalService;

    @RequestMapping("list")
    public Result list(){
        List<Hospital> list = hospitalService.list();
        return Result.OK(list);
    }
}
